package cn.paul.wechatshop.service.impl;

import cn.paul.wechatshop.dao.ProductCategoryDao;
import cn.paul.wechatshop.entity.ProductCategory;
import cn.paul.wechatshop.service.IProductCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 徐凌峰
 * @date 2017/12/10 0010
 */
@Service
public class ProductCategoryServiceImpl implements IProductCategoryService {


    @Autowired
    private ProductCategoryDao productCategoryDao;

    @Override
    public ProductCategory findOne(Integer categoryId) {
        return productCategoryDao.findOne(categoryId);
    }


    @Override
    public List<ProductCategory> findAll() {
        return productCategoryDao.findAll();
    }

    @Override
    public List<ProductCategory> findByCategoryTypeIn(List<Integer> categoryTypeList) {
        return productCategoryDao.findByCategoryTypeIn(categoryTypeList);
    }

    @Override
    public ProductCategory save(ProductCategory productCategory) {
        return productCategoryDao.save(productCategory);

    }
}
